In my last blog post, I started my journey into the world of technical art in the form of rigging. This post covers the second half of that exploration in the form of engine implementation. The goal was to take an imported model, get it into the engine and have all materials, physics, and animations hooked up properly to get a sense of the end of an asset pipeline.
Instead of taking the previous arm model in engine I wanted to try something different that was more dependent on the engine rather than doing everything in Maya. For this I settled on utilizing Unreal Engine's Chaos Vehicle system as this would incorporate all of the learning objectives I stated above in one project.
Since this project was in Unreal I had the benefit of comprehensive documentation which was the primary guide I used. The other source I used was a few Youtube videos by Reality Fakers and Sendoa Bergasa. I ended up using a free SUV model for the first half from Switchboard Studios and a Humvee model off of TurboSquid from 3d_Molier International for the second half of the project. Because my only goal was engine implementation I wanted to save time and use pre-modeled assets instead of making everything from scratch. Doing this also taught me how to tweak others' models, but I will get to that a bit later.
The first step picked up where I left off, model prep inside of Maya. The documentation was very clear about making sure to get size and model orientation correct; otherwise the vehicle controllers wouldn't work properly later. I ended up having to change Maya's coordinate system from right-handed to left-handed in the settings to orient the vertices properly.
Rigging was the next step, and before I got into a more complicated suspension setup I wanted to try out the basics, so for the SUV all the rig needed was a root joint and one joint per wheel. The only note I have for this part is to make sure the joint is centered to avoid the wheels wobbling in engine.
The next step was importing the model as a skeletal mesh into the engine. I didn't get the textures from the original download, so I just changed the color to something functional (I ended up changing it again later to see better). I also got the Chaos Vehicle Plugin installed and added a spring arm camera setup to the vehicle so I could see what was going on.
These were the nodes I added to the spring arm to allow it to move around with my mouse. It wasn't part of the actual vehicle process but it was nice to look around when testing.
Next up was editing the collision and physics. Each wheel got a sphere collision and the body was a convex hull. I also created the game start blueprint and the vehicle pawns to get everything started in terms of the actual vehicle systems.
Here is my test to make sure collision was working properly. The wheels were hooked up even though you couldn't see it. I also added a ramp to better see how the wheels were reacting to the ground.
It only took a few nodes to set up the animation blueprint for the wheels. Most of the math in terms of speed, suspension, and wheel turning was handled by the Vehicle Wheel blueprints. The animation is just the visual representation of the physics, it wasn't driving anything.
Now that the animation blueprint is hooked up you can see the wheels doing what they are supposed to. This setup works without any suspension parts and from afar most wouldn't notice. The next step is tuning the vehicle blueprints and allowing for inputs to actually drive the car around.
Getting the vehicle drivable required two parts. First adding the inputs in the project settings, then in the vehicle blueprint assigning those keys to the throttle and brake systems. Most of these nodes along with the past ones come with the Chaos plugin and are straightforward with the documentation. As an artist, I was worried about all the technical stuff but Unreal engineers did a really good job making it plug-and-play.
With that, the basic vehicle setup was pretty much finished. The car slides a bit and isn't super responsive but from what I learned those are all things that can be tweaked in the vehicle blueprint to fine tune. However, I opted to move onto the next phase of the project as this is just a test.
One last comment I had was on the wheel pawn system. For this car I made two, one for the front and one for the rear. This is what the PHaT assets hooked up to to make the car drivable. The cool note I had was the options for steering and engine influence. The front wheels were the only ones that linked to steering like a real car.
When it came to the engine influence I thought it was really cool that it could implement the different real life drivetrains of cars, whether it was turning on the engine influence on the front wheels for a FWD car, or the rear for RWD. You could also turn it on for both front and back to get a full 4WD vehicle. I thought it would be cool to revisit this at another time and add a switch like a gear shifter on a 4WD vehicle.
The second part of this process was getting an animated suspension set up using all of my learning from the past two experiments. I added this in the same project as the SUV so all of the spring arm and inputs were already set up. All I had to do was repeat the Collision and vehicle pawn setup.
At this point the Humvee and SUV are set up pretty much the same way. The main difference is the wheels only rotate, they don't move like a suspension would. That is because there is a whole secondary skeleton that I haven't set up yet. For that we need to go back to Maya and add a few more bones.
Before we get into all of the Maya stuff I wanted to make a note of doing some tweaks to the model for the engine. The base file was created using spec/gloss texturing, and Unreal doesn't natively support it. From past projects I know that gloss maps are just inverted roughness maps, so I flipped them using a node in the material graph. I also tweaked the saturation of the color maps so I didn't have to spend time making new ones.
Thankfully the Unreal documentation came with a downloadable asset to follow along. It was really helpful being able to pick it apart and see what was needed. There was still a good bit of work to be done as the suspension systems were built differently. This led to me overlooking a key joint and not being able to fully follow the example.
This was also where I discovered that parts of the model weren't built properly for what I was trying to do. First the central vertices of the wheels were misaligned. To fix this I used a rigging trick with locators to find the mesh center and then snap the vertices to it. The second issue was that some parts were modeled to fit but not to move. In order for this driveshaft part to line up with the wheel center to be able to rotate on the same axis I had to move it into the spring.
Here is the completed hierarchy and a few views of the finished rig. As confusing as it looks everything makes sense in the context of two nodes used in the engine: the "copy" node and "look-at" node. With this in mind each joint either pointed at another one, or was layered on top of it. In the hierarchy you can see that there are bones for physical assets and ones for visualization. The mesh is skinned to the visual bones, and the physics bones are what the engine reads for the physics assets. That's why earlier when I mentioned the wheels spin but don't move, they are parented to the physics bones only via rotation. All of the movement comes from other joints like control arms and springs.
Here is the finished animation blueprint in engine. Again it looks intimidating but to break it down each column is its own part, there are four versions of each part per wheel. Here you can see the aforementioned two functions: "copy" and "look-at" in use. Unfortunately this is where I didn't have the extra bone to complete the full rig. The intention is to have a control joint that swings with the control arms instead of just bouncing up and down. Without this joint I was still able to get everything looking right, just not completely real-world accurate. I think I found a happy medium between realism and making something that doesn't break immersion.
A side effect of not using the control joint is I ended up with some extra bones not used in-engine, so next time it can be streamlined further.
One last thing I had to do was edit the vehicle's center of gravity. With the big container on the back the Humvee became very top-heavy. This was a manual adjustment in the vehicle blueprint. Motor torque is also in this section along with any other vehicle controls to fine tune the handling and feel.
This is the final result, overall I am pretty pleased with it considering it's my first attempt. Everything moves and reacts as it should and holds up visually. I learned a lot about the rigging pipeline and engine implementation and I am excited to add these new skills to my upcoming projects.























